A Tutorial on the Universality and Expressiveness of Fold
نویسنده
چکیده
In functional programming, fold is a standard operator that encapsulates a simple pattern of recursion for processing lists. This article is a tutorial on two key aspects of the fold operator for lists. First of all, we emphasize the use of the universal property of fold both as a proof principle that avoids the need for inductive proofs, and as a definition principle that guides the transformation of recursive functions into definitions using fold. Secondly, we show that even though the pattern of recursion encapsulated by fold is simple, in a language with tuples and functions as first-class values the fold operator has greater expressive power than might first be expected.
منابع مشابه
Development and Usability Evaluation of an Online Tutorial for “How to Write a Proposal” for Medical Sciences Students
Background and Objective: Considering the importance of learning how to write a proposal for students, this study was performed to develop an online tutorial for “How to write a Proposal” for students and to evaluate its usability. Methods: This study is a developmental research and tool design. “Gamified Online Tutorial based on Self-Determination Theory (GOT-STD) Framework" became the basis f...
متن کاملThe Effect of a Premarital Educational Program Based on 9- Type Personalities Types (Enneagram) on Emotional Expressiveness of Couples Preparing for Marriage
Objectives: This study aimed to develop a premarital educational package based on based on 9-type personalities (Enneagram) to improve emotional expressiveness of couples preparing for marriage. Methods: In this quasi-experimental study with pretest/posttest design, the study population consisted of all couples in the premarital stage referred to counseling centers in Isfahan, Iran during sp...
متن کاملEffectiveness of Mindfulness-Based Stress Reduction Training on Emotional Expressiveness and Fear of Hypoglycemia in Patients with Type 2 Diabetes
Objective: Diabetes is a common chronic disorder in which there is a high risk of physical complications and psychological problems such as hypoglycemia and inability to express emotions. Psychological interventions can be effective in this regard. The aim of this study was to investigate the effectiveness of mindfulness-based stress reduction (MBSR) training on emotional expressiveness and fea...
متن کاملThe Association between Emotional Expressiveness Style and Addiction Potential in Male High School Students
Objectives: The current study was designed to examine the association between the emotional expressiveness style and addiction potential among male high school students. Methods: A cross-sectional study was conducted on 180 male high school students that had been selected through multi-stage random sampling from Karaj city’s at-risk high schools. The research tools consisted of: a) the...
متن کاملA study on the role of selective attention, vigilance and ambivalence over emotional expressiveness for predicting pain severity in patients with chronic musculoskeletal pains
Introduction: When there is a pain requiring focused clinical attention and is associated with emotional and functional disorders, it is called pain disorder. The present study aims to study the role of selective attention, vigilance and ambivalence over emotional expressiveness for predicting pain severity in patients with chronic musculoskeletal pains. Methods: The study population included 1...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Funct. Program.
دوره 9 شماره
صفحات -
تاریخ انتشار 1999